package com.cloudfun.campusshare.common.model.dto;

import com.cloudfun.campusshare.common.constant.RepairFaultType;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * Created by Huqin on 2020/4/22
 */
@Data
@ApiModel("报修DTO")
public class RepairCreateDTO {

    @ApiModelProperty(value = "设备识别码")
    @NotEmpty(message = "设备识别码不能为空")
    @Length(max = 40, message = "设备识别码过长，限制40个字")
    @JsonProperty("deviceId")
    private String imei;

    @ApiModelProperty(value = "故障部位")
    @NotEmpty(message = "故障部位不能为空")
    private List<RepairFaultType> faultType;

    @ApiModelProperty(value = "故障描述")
    private String faultDesc;

    @ApiModelProperty(value = "图片附件")
    private List<String> attachIds;

}
